home *** CD-ROM | disk | FTP | other *** search
- %case window field%
- short %fieldname%;
- %case create%
- cur->%fieldname% = 1;
- %case mousein%
- GetWRect (%itemname%, &bounds);
- if (PtInRect (where, &bounds)) {
- TrackPopup (bounds, %popupID%, &cur->%fieldname%);
- }
- %case update%
- GetWRect (%itemname%, &bounds);
- UpdatePopup (bounds, %popupID%, cur->%fieldname%);
- %case itemNr%
- %DefineItem%
- %case dialog field%
- short %fieldname%;
- %haveField%
- %case init field%
- info->%fieldname% = 1;
- %case auxiliaryProto%
- static pascal void Draw%itemname%% %(DialogPtr whichDialog,
- short itemNr);
- %case auxiliary%
- %set needsRefCon = true%
- /*----------*/
- static pascal void Draw%itemname%% %(DialogPtr whichDialog,
- short itemNr)
- {
- %dlogname%RecPtr% %data;
-
- %if lang = MPW%
- #pragma unused (whichDialog)
-
- %end if%
- data = (%dlogname%RecPtr) GetWRefCon (whichDialog);
- DrawPopup (itemNr, %popupID%, data->%fieldname%);
- } /*Draw%itemname%*/
-
- %case set%
- %if lang = AUX%
- SetUserItem (%itemname%, (ProcPtr) Draw%itemname%);
- %else%
- SetUserItem (%itemname%, (ProcPtr) &Draw%itemname%);
- %endif%
- %case hit%
- case %itemname%:
- %if not labelName = %
- InvertLabel (%labelName%);
- %endif%
- DoPopup (%itemname%, %popupID%, &info->%fieldname%);
- %if not labelName = %
- InvertLabel (%labelName%);
- %endif%
- %if menuName = Sound%
- PlaySound (%menuName%Menu, info->%fieldname%);
- %endif%
- break;
-